package com.forum.service.impl;

import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.forum.dao.StudentinfotabDao;
import com.forum.entity.StudentinfotabEntity;
import com.forum.entity.view.StudentinfotabView;
import com.forum.service.StudentinfotabService;
import com.forum.utils.MyQuery;
import com.forum.utils.PageUtils;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 学生信息表 服务实现类
 * </p>
 *
 * @author 张继成
 * @since 2023-12-30
 */
@Service
public class StudentinfotabServiceImpl extends ServiceImpl<StudentinfotabDao, StudentinfotabEntity> implements StudentinfotabService {

    @Override
    public List<StudentinfotabView> selectListView(Wrapper<StudentinfotabEntity> wrapper) {
        return baseMapper.selectListView(wrapper);
    }

    @Override
    public PageUtils queryPage(Map<String, Object> params, Wrapper<StudentinfotabEntity> wrapper) {
        Page<StudentinfotabEntity> page = new MyQuery<StudentinfotabEntity>(params).getPage();
        page.setRecords(baseMapper.selectListView(page,wrapper));
        PageUtils pageUtils = new PageUtils(page);
        return pageUtils;
    }
}
